<template>
  <div class="error-component">
    <a-result
      status="error"
      title="组件加载失败"
      sub-title="无法加载请求的组件，请检查组件路径是否正确。"
    >
      <template #extra>
        <a-button type="primary" @click="goBack">
          返回上一页
        </a-button>
      </template>
    </a-result>
  </div>
</template>

<script lang="ts" setup>
import { useRouter } from 'vue-router';

const router = useRouter();

const goBack = () => {
  router.back();
};
</script>

<style scoped>
.error-component {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  padding: 20px;
}
</style> 